Repository navigation
fix: show flagged replies on a comment's page, and two smaller fixes - #321
Merged
therealsama merged 3 commits intoNov 3, 2026
Merged
Conversation
A comment's page built its replies from Algolia's item tree, which leaves out flagged and deleted comments along with every reply under them. The story thread already brings those back, so the same comment showed fewer replies on its own page. On story 50319510, comment 50320482 showed 23 replies in the thread and 8 on its page, desktop and phone alike: a flagged reply and its 14 replies were missing. The page still shows the item tree's replies first. It then reads the story's comments from search and the missing parents from Firebase, as the thread does, and swaps in the fuller tree when it has more comments. A flagged reply shows [flagged] with its replies, and a deleted one shows [deleted]. If that read fails, the item tree's replies stay. When the item tree has no replies, the page first reads the comment and its replies from Firebase, and searches only if one of those has replies of its own or is live. Most such comments have no replies at all, and the rest mostly have only flagged or deleted replies with nothing under them, which the page doesn't show. While a search that may add replies runs, the replies section keeps its skeleton instead of saying "No replies yet." Comments on the same story share one read for five minutes, so the swipe viewer's neighbouring panels don't each search the whole story. Threads bigger than search returns (1,000 comments) skip it after the first page and keep the item tree's replies.
…ads to In the swipe comment viewer, tapping "parent" pushed the parent's URL, then about 16ms later replaced it with the reply's URL, then replaced it with the parent's again once the parent's siblings loaded, around 600ms later. A reload or share in that window used the reply's URL. Back from the parent replaced the reply's history entry with the parent's URL, and could land on one of the reply's siblings instead of the reply. The URL-sync effect ran in the same pass as the effect that handles an outside navigation, while its state still held the previous comment's siblings. It now also checks the scroll-init ref, which the navigation effect resets before it runs.
/from/ with no domain showed "No domain specified" over the default not-found text, "This item doesn't exist or may have been removed."
therealsama
force-pushed
the
fix/comment-view-flagged-replies-and-parent-link
branch
from
November 3, 2026 15:43
027be8a to
e489542
Compare
therealsama
enabled auto-merge
November 3, 2026 23:32
kplachkov
approved these changes
Nov 3, 2026
therealsama
deleted the
fix/comment-view-flagged-replies-and-parent-link
branch
November 3, 2026 23:34
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three bugs.
Bug fixes
A comment's own page left out flagged and deleted replies, and every reply under them. Both the desktop page and the phone's full-screen comment built replies from Algolia's item tree, which drops those comments with their whole subtree. The story thread already brings them back (fix: keep replies to flagged comments, page domain feeds fully, and four smaller fixes #318), so the same comment showed fewer replies on its own page. On story 50319510, comment 50320482 showed 23 replies in the thread and 8 on its page: a flagged reply and its 14 replies were missing. The page still shows the item tree's replies first. It then reads the story's comments from search and the missing parents from Firebase, the way the thread does, through a new
fetchCommentReplies(), and swaps in the fuller tree when it has more comments. Flagged replies show[flagged]and deleted ones[deleted], with their replies under them. If that read fails, the item tree's replies stay. Comments on the same story share one read for five minutes, so the swipe viewer's neighbouring panels (up to five load at once) don't each search the whole story. That page now shows all 23, on desktop and on a phone. This closes the comment-view limitation listed in fix: keep replies to flagged comments, page domain feeds fully, and four smaller fixes #318.When the item tree has no replies for a comment, the page first reads the comment and its replies from Firebase. It searches the story only if one of those replies has replies of its own or is live. Otherwise it says "No replies yet." without searching: most such comments have no replies at all, and the rest mostly have only flagged or deleted replies with nothing under them, which the page doesn't show. While a search that may add replies is running, the replies section keeps its skeleton instead of saying "No replies yet." Before that, comment 50322186 said "No replies yet." for about two seconds and then showed its flagged reply. On four front-page stories (1,936 comments), 21 comments had no replies in the item tree but some in Firebase. The check searched for the 5 that gain replies and skipped the 16 that don't.
On a phone, the "parent" link briefly switched the URL back to the reply, and Back from the parent could land on the wrong comment. The swipe comment viewer's URL-sync effect ran in the same pass as the effect that handles an outside navigation, while its state still held the previous comment's siblings, and so it navigated to one of those.
The sync now also checks the scroll-init ref, which the navigation effect resets just before it runs. In the browser the tap now makes one
pushState, Back makes no history writes, and both land on the right comment. The existing e2e test only checked the final URL after the tap, which was always right./from/with no domain said "This item doesn't exist or may have been removed." under "No domain specified", because only the title overrodeStateView's not-found defaults. It now says "Pick a story's site to see more submissions from it."Known limitations